package com.yc.cloud.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yc.cloud.common.orm.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 摄像头录制任务执行日志表
 * </p>
 *
 * @author kinggu
 * @since 2025-09-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hw_camera_recording_log")
public class HwCameraRecordingLog extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 摄像头ID
     */
    @TableField("camera_id")
    private Long cameraId;

    /**
     * 存储策略ID
     */
    @TableField("strategy_id")
    private Long strategyId;

    /**
     * 时间段ID
     */
    @TableField("time_slot_id")
    private Long timeSlotId;

    /**
     * 操作类型：START-开始录制，STOP-停止录制
     */
    @TableField("operation_type")
    private String operationType;

    /**
     * 操作时间
     */
    @TableField("operation_time")
    private LocalDateTime operationTime;

    /**
     * 预期执行时间
     */
    @TableField("expected_time")
    private LocalDateTime expectedTime;

    /**
     * 执行结果：SUCCESS-成功，FAILED-失败，SKIPPED-跳过
     */
    @TableField("result_status")
    private String resultStatus;

    /**
     * 错误信息
     */
    @TableField("error_message")
    private String errorMessage;

    /**
     * 执行耗时（毫秒）
     */
    @TableField("execution_duration")
    private Long executionDuration;

    /**
     * 逻辑删除标志：0-未删除，1-已删除
     */
    @TableField("is_deleted")
    private Byte isDeleted;

    public static final String CameraId = "camera_id";
    public static final String StrategyId = "strategy_id";
    public static final String TimeSlotId = "time_slot_id";
    public static final String OperationType = "operation_type";
    public static final String OperationTime = "operation_time";
    public static final String ExpectedTime = "expected_time";
    public static final String ResultStatus = "result_status";
    public static final String ErrorMessage = "error_message";
    public static final String ExecutionDuration = "execution_duration";
    public static final String IsDeleted = "is_deleted";

} 